

$(document).ready(function () {
	$.ajax({
		url: '../scoreAll.action',
		type: 'post',    
		cache: false,    
		dataType: 'json',   
		data: {}, 
		success: function (resp) {
			var result = eval("("+resp+")");
			//alert(result);
			var array1 = eval("("+result.data+")");
			var html = "";
    		if( result.flag == "true" ){  
    			//alert("加载成功");
    			$.each(array1, function(i, value) {
    				html += "<tr><td>"+value.userId+"</td><td>"+value.examId+"</td><td>"+value.firstScore+"</td><td>"+value.finalScore+"</td></tr>";
    			});
    			//alert(html);
    			$("#data").html(html);
            }else{  
             	alert(result.reason);    
            }    
		  },    
		error : function () {   
     	 	alert("通信失败");    
		}    
	});
})